package com.yanqu.road.entity.activity.feast.data;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;


@FieldTypeAnnotation(tableName = "t_u_activity_feast_mount_allot_data")
public class FeastUserMountAllotData extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", select = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "玩家ID", select = true)
    private long userId;

    @FieldTypeAnnotation(desc = "灵峰信息", update = true)
    private Map<Long, Integer> userMountMap = new ConcurrentHashMap<>();

    public FeastUserMountAllotData() {
    }

    public int getActivityId() {
        return activityId;
    }
    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public long getUserId() {
        return userId;
    }
    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public Map<Long, Integer> getUserMountMap() {
        return userMountMap;
    }
    public void setUserMountMap(Map<Long, Integer> userMountMap) {
        if (null == userMountMap){
            return;
        }
        this.userMountMap = userMountMap;
        setOp(DataStatus.Update);
    }
}
